/* 基础样式 */
.theme-container {
  position: relative;
  min-height: 100vh;
  transition: background-color 0.3s ease;
}

.light {
  background-color: #fff;
  color: #333;
}

.dark {
  background-color: #222;
  color: #fff;
}

/* 按钮样式 */
.theme-toggle-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 100;
  transition: transform 0.2s ease;
}

.theme-toggle-btn:hover {
  transform: scale(1.1);
}

/* 现代浏览器动画 */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 9999;
  animation: circle-expand 0.5s ease-in;
}

@keyframes circle-expand {
  from {
    clip-path: circle(0 at var(--x) var(--y));
  }
  to {
    clip-path: circle(var(--r) at var(--x) var(--y));
  }
}

/* 降级方案样式 */
.theme-overlay {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 9999;
  pointer-events: none;
}